﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="EMPLOYEE.aspx.vb" Inherits="PRUEVANET3.Formulario_web12" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="GridView1" runat="server" AllowSorting="True" 
    AutoGenerateColumns="False" DataKeyNames="emp_id" DataSourceID="SqlDataSource1" 
    EmptyDataText="No hay registros de datos para mostrar.">
    <Columns>
        <asp:BoundField DataField="emp_id" HeaderText="emp_id" ReadOnly="True" 
            SortExpression="emp_id" />
        <asp:BoundField DataField="fname" HeaderText="fname" SortExpression="fname" />
        <asp:BoundField DataField="minit" HeaderText="minit" SortExpression="minit" />
        <asp:BoundField DataField="lname" HeaderText="lname" SortExpression="lname" />
        <asp:BoundField DataField="job_id" HeaderText="job_id" 
            SortExpression="job_id" />
        <asp:BoundField DataField="job_lvl" HeaderText="job_lvl" 
            SortExpression="job_lvl" />
        <asp:BoundField DataField="pub_id" HeaderText="pub_id" 
            SortExpression="pub_id" />
        <asp:BoundField DataField="hire_date" HeaderText="hire_date" 
            SortExpression="hire_date" />
    </Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:pubsConnectionString7 %>" 
    DeleteCommand="DELETE FROM [employee] WHERE [emp_id] = @original_emp_id AND [fname] = @original_fname AND (([minit] = @original_minit) OR ([minit] IS NULL AND @original_minit IS NULL)) AND [lname] = @original_lname AND [job_id] = @original_job_id AND (([job_lvl] = @original_job_lvl) OR ([job_lvl] IS NULL AND @original_job_lvl IS NULL)) AND [pub_id] = @original_pub_id AND [hire_date] = @original_hire_date" 
    InsertCommand="INSERT INTO [employee] ([emp_id], [fname], [minit], [lname], [job_id], [job_lvl], [pub_id], [hire_date]) VALUES (@emp_id, @fname, @minit, @lname, @job_id, @job_lvl, @pub_id, @hire_date)" 
    ProviderName="<%$ ConnectionStrings:PUBSConnectionString.ProviderName %>" 
    SelectCommand="SELECT [emp_id], [fname], [minit], [lname], [job_id], [job_lvl], [pub_id], [hire_date] FROM [employee]" 
    
    UpdateCommand="UPDATE [employee] SET [fname] = @fname, [minit] = @minit, [lname] = @lname, [job_id] = @job_id, [job_lvl] = @job_lvl, [pub_id] = @pub_id, [hire_date] = @hire_date WHERE [emp_id] = @original_emp_id AND [fname] = @original_fname AND (([minit] = @original_minit) OR ([minit] IS NULL AND @original_minit IS NULL)) AND [lname] = @original_lname AND [job_id] = @original_job_id AND (([job_lvl] = @original_job_lvl) OR ([job_lvl] IS NULL AND @original_job_lvl IS NULL)) AND [pub_id] = @original_pub_id AND [hire_date] = @original_hire_date" 
    ConflictDetection="CompareAllValues" 
    OldValuesParameterFormatString="original_{0}">
    <DeleteParameters>
        <asp:Parameter Name="original_emp_id" Type="String" />
        <asp:Parameter Name="original_fname" Type="String" />
        <asp:Parameter Name="original_minit" Type="String" />
        <asp:Parameter Name="original_lname" Type="String" />
        <asp:Parameter Name="original_job_id" Type="Int16" />
        <asp:Parameter Name="original_job_lvl" Type="Byte" />
        <asp:Parameter Name="original_pub_id" Type="String" />
        <asp:Parameter Name="original_hire_date" Type="DateTime" />
    </DeleteParameters>
    <InsertParameters>
        <asp:Parameter Name="emp_id" Type="String" />
        <asp:Parameter Name="fname" Type="String" />
        <asp:Parameter Name="minit" Type="String" />
        <asp:Parameter Name="lname" Type="String" />
        <asp:Parameter Name="job_id" Type="Int16" />
        <asp:Parameter Name="job_lvl" Type="Byte" />
        <asp:Parameter Name="pub_id" Type="String" />
        <asp:Parameter Name="hire_date" Type="DateTime" />
    </InsertParameters>
    <UpdateParameters>
        <asp:Parameter Name="fname" Type="String" />
        <asp:Parameter Name="minit" Type="String" />
        <asp:Parameter Name="lname" Type="String" />
        <asp:Parameter Name="job_id" Type="Int16" />
        <asp:Parameter Name="job_lvl" Type="Byte" />
        <asp:Parameter Name="pub_id" Type="String" />
        <asp:Parameter Name="hire_date" Type="DateTime" />
        <asp:Parameter Name="original_emp_id" Type="String" />
        <asp:Parameter Name="original_fname" Type="String" />
        <asp:Parameter Name="original_minit" Type="String" />
        <asp:Parameter Name="original_lname" Type="String" />
        <asp:Parameter Name="original_job_id" Type="Int16" />
        <asp:Parameter Name="original_job_lvl" Type="Byte" />
        <asp:Parameter Name="original_pub_id" Type="String" />
        <asp:Parameter Name="original_hire_date" Type="DateTime" />
    </UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
